package com.wuze.cloud.pojo;

import com.wuze.cloud.util.SnowFlakeIdWorker;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: wuze
 * @description:
 * @date: 2023/02/28
 */
@Data
public class SysStorageDO implements Serializable {

    private static final long serialVersionUID = 1799102380614393054L;

    private Long id;
    private Long userId;
    private Long currSize;
    private Long maxSize;
    private Long documentSize;
    private Long imageSize;
    private Long videoSize;
    private Long ortherSize;
    private Date createTime;
    private Date updateTime;

    public static SysStorageDO get(Long userId) {
        SysStorageDO storage = new SysStorageDO();
        storage.setId(SnowFlakeIdWorker.nextId());
        storage.setUserId(userId);
        storage.setMaxSize(200 * 1024 * 1024L);
        return storage;
    }
}
